
# star官网 nginx Dockerfile
# Version 0.1
FROM nginx
MAINTAINER joy.wang

COPY nginx.template /etc/nginx/conf.d/nginx.template
COPY dist/ /usr/share/nginx/html/

# 通过 envsubst 命令替换 nginx.template 模板中的变量，并覆盖/etc/nginx/nginx.conf 
CMD envsubst '$NGINX_HOST $DOCKER_REQUEST_DOMAIN_PREFIX' < /etc/nginx/conf.d/nginx.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'
